import 'package:flutter/material.dart';

class GridViewExtentCase extends StatelessWidget {
  const GridViewExtentCase({super.key});
  @override
  Widget build(BuildContext context) {
    return GridView.extent(

      maxCrossAxisExtent: 200,
      mainAxisSpacing: 10,
      crossAxisSpacing: 10,
      childAspectRatio: 2/1,
      children: [
        Container( color: Colors.red,),
        Container(color: Colors.blue,),
        Container(color: Colors.green,),
        Container(color: Colors.yellow,),
        Container(color: Colors.purple,),
        Container(color: Colors.orange,),
        Container(color: Colors.pink,),
        Container(color: Colors.brown,),
        Container(color: Colors.teal,),
      ],
    
    );
  }
}